package com.mischa.atc.clearances;

import junit.framework.Assert;

import org.junit.Test;

import com.mischa.atc.Aircraft;
import com.mischa.atc.Clearance;
import com.mischa.atc.Flight;

public class AltitudeClearance implements Clearance {
	private int _clearedAltitude;
	private boolean _isComplete;
	
	public AltitudeClearance(int clearedAltitude) {
		_clearedAltitude = clearedAltitude;
	}
	
	@Override
	public void execute(Flight target) {
		target.maintainAltitude(_clearedAltitude);
		_isComplete = true;
	}

	@Override
	public boolean isComplete() {
		return _isComplete;
	}
	
}
